//
//  Website.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Website.h"

@implementation Website

-(id)init
{

    _address = @"www.baidu.com";
    _page = @"lalalala";
    _age = 10;
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %@ %ld", _address, _page, _age);

}

-(void)change
{

    NSLog(@"搜狐%@主页%@在搜狐%ld周年时改版了", _address, _page, _age);

}


-(NSString *)address
{
    return _address;
}

-(void)setAddress:(NSString *)address
{
    _address = address;
}
-(NSString *)page
{
    return _page;
}
-(void)setPage:(NSString *)page
{
    _page = page;
}
-(NSInteger)age
{
    return _age;
}
-(void)setAge:(NSInteger)age
{
    _age = age;
}
-(id)initWithAddress:(NSString *)address page:(NSString *)page age:(NSInteger)age
{

    _address = address;
    _page = page;
    _age = age;
    return self;

}


+ (id)WebsiteWithAddress:(NSString *)address page:(NSString *)page age:(NSInteger)age
{
    Website *w = [[Website alloc] initWithAddress:address page:page age:age];
    return w;
}


@end
